﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Common;
using Provider;using System.Data;

namespace AccessToDataEnergyLibrury
{
    public partial class AccessDataEnergyLibrury
    {
        public List<User> GetAllUsers()
        {
            List<User> users = new List<User>();
            DataRowCollection allUsers = this.energyDataSet.users.Rows;

            foreach(energyzmemDataSet.usersRow userRow in allUsers)
            {
                users.Add(new User(userRow.id_users, userRow.employeeRow.id_Employee, userRow.employeeRow.name, userRow.password, userRow.IsAdmin));
            }
                return users;
        }
    }
}
